package com.webwork.lims.common.dataobject;

import java.util.Date;

/**
 * 操作者和操作时间
 */
public class CtrlerAndTime {

	/**
	 * 操作者
	 */
	private String controller;

	/**
	 * 操作时间
	 */
	private Date time;

	public CtrlerAndTime() {
		super();
	}

	/**
	 * 操作者和操作时间同时<br>
	 * 其中一个为空就是返回默认值
	 * 
	 * @param controller
	 * @param time
	 */
	public CtrlerAndTime(String controller, Date time) {
		super();
		this.controller = controller;
		this.time = time;
	}

	public CtrlerAndTime(String controller) {
		super();
		this.controller = controller;
		this.time = null;
	}

	public CtrlerAndTime(Date time) {
		super();
		if (time == null) {
			this.controller = null;
			this.time = null;
		} else {
			this.controller = null;
			this.time = time;
		}
	}

	/**
	 * 操作者
	 */
	public String getController() {
		return controller;
	}
	
	public void setController(String controller) {
		this.controller = controller;
	}

	/**
	 * 操作时间
	 */
	public Date getTime() {
		if (time == null) {
			return null;
		}
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

}
